<div class="container">
  <div class="row text-center" style="margin-top:5rem;">
    <h2 style="margin: 0 auto;">用户登录</h2>
  </div>
  <div class="row">
    <div class="col-md-6 offset-md-3">
      <ngb-alert *ngIf="message" [type]="type" [dismissible]="false">
        {{message}}
      </ngb-alert>
      <form (ngSubmit)="onSubmit()">
        <div class="form-group">
          <label for="username">用户名</label>
          <input type="text" class="form-control" [(ngModel)]="login.userName" name="userName" id="userName" placeholder="请输入用户名">
        </div>
        <div class="form-group">
          <label for="password">密码</label>
          <input type="password" class="form-control" [(ngModel)]="login.password" name="password" id="password" placeholder="请输入密码">
        </div>
        <div class="form-group">
        <label for="captcha">验证码</label>
          <div style="display:flex">
            <input type="text" class="form-control" style="flex:1;margin-right:8px;" [(ngModel)]="login.captcha" name="captcha" id="captcha" placeholder="请输入验证码">
            <img width="120" height="38" class="captcha_img" style="width:120px" (click)="change()" src="{{captchaImg}}">
          </div>
        </div>
        <div class="text-md-center">
          <button type="submit" class="exbtn exbtn-primary" style="width:45%;">登 录</button>
        </div>
      </form>
    </div>
  </div>
</div>
